<?php
/**
 * Created by JetBrains PhpStorm.
 * User: amjadsyed
 * Date: 23/03/13
 * Time: 9:01 PM
 * To change this template use File | Settings | File Templates.
 */

/*if ($_POST['start'] != ""){
    $output = shell_exec('/Users/amjadsyed/tomcat.sh start');
    echo $output;
}
if ($_POST['stop'] != ""){
    $output = shell_exec('/Users/amjadsyed/tomcat.sh stop');
    echo $output;
}*/

 /* $lines = file('/Users/amjadsyed/Tomcat/logs/catalina.2013-03-23.log');
  for ($i = count($lines)-50; $i < count($lines); $i++) {
      echo $lines[$i]."\n";
  }*/

echo shell_exec('tail -f /Users/amjadsyed/Tomcat/logs/catalina.2013-03-23.log');

?>